:target{#usage}

# Usage

:target{#installation}

## <Target id="id1" />Installation

To use Lumache, first install it using pip:

```console
(.venv) $ pip install lumache
```

:target{#creating-recipes}

## Creating recipes

To retrieve a list of random ingredients,
you can use the `lumache.get_random_ingredients()` function:

<Outline domain="py" objectType="function" target={"lumache.get_random_ingredients"} module={"lumache"} fullname={"get_random_ingredients"} parameters={["kind"]} description={"Return a list of random ingredients as strings."}>
  <Outline.Signature fullname="get_random_ingredients" id="lumache.get_random_ingredients">
    <Outline.Prefix>lumache.</Outline.Prefix><Outline.Name>get\_random\_ingredients</Outline.Name><Outline.ParameterList><span>(</span><Outline.Parameter><span className="name">kind</span><span>:</span><span>{" "}</span><span className="name">[List](https://docs.python.org/3.11/library/typing.html#typing.List "(in Python v3.11)")<span>\[</span>[str](https://docs.python.org/3.11/library/stdtypes.html#str "(in Python v3.11)")<span>]</span><span>{" "}</span><span>|</span><span>{" "}</span>[None](https://docs.python.org/3.11/library/constants.html#None "(in Python v3.11)")</span><span>{" "}</span><span>=</span><span>{" "}</span><span>None</span></Outline.Parameter><span>)</span></Outline.ParameterList><Outline.ReturnType><span>{" \u2192 "}</span>[List](https://docs.python.org/3.11/library/typing.html#typing.List "(in Python v3.11)")<span>\[</span>[str](https://docs.python.org/3.11/library/stdtypes.html#str "(in Python v3.11)")<span>]</span></Outline.ReturnType>
  </Outline.Signature>

  <Outline.Content>
    Return a list of random ingredients as strings.

    <FieldList>
      <dl>
        <dt className="field-name">
          Parameters
        </dt>

        <dd className="field-body">
          <Outline.ParameterTarget>kind</Outline.ParameterTarget> ([<em>list</em>](https://docs.python.org/3.11/library/stdtypes.html#list "(in Python v3.11)")<em>\[</em>[<em>str</em>](https://docs.python.org/3.11/library/stdtypes.html#str "(in Python v3.11)")<em>] or </em><em>None</em>) -- Optional "kind" of ingredients.
        </dd>

        <dt className="field-name">
          Raises
        </dt>

        <dd className="field-body">
          [<strong>lumache.InvalidKindError</strong>](#lumache.InvalidKindError "lumache.InvalidKindError") -- If the kind is invalid.
        </dd>

        <dt className="field-name">
          Returns
        </dt>

        <dd className="field-body">
          The ingredients list.
        </dd>

        <dt className="field-name">
          Return type
        </dt>

        <dd className="field-body">
          [list](https://docs.python.org/3.11/library/stdtypes.html#list "(in Python v3.11)")\[[str](https://docs.python.org/3.11/library/stdtypes.html#str "(in Python v3.11)")]
        </dd>
      </dl>
    </FieldList>
  </Outline.Content>
</Outline>

The `kind` parameter should be either `"meat"`, `"fish"`,
or `"veggies"`. Otherwise, [`lumache.get_random_ingredients()`](#lumache.get_random_ingredients "lumache.get_random_ingredients")
will raise an exception.

<Outline domain="py" objectType="exception" target={"lumache.InvalidKindError"} module={null} fullname={"lumache.InvalidKindError"} description={"Raised if the kind is invalid."}>
  <Outline.Signature fullname="lumache.InvalidKindError" id="lumache.InvalidKindError">
    <Outline.Keyword>exception<span>{" "}</span></Outline.Keyword><Outline.Prefix>lumache.</Outline.Prefix><Outline.Name>InvalidKindError</Outline.Name>
  </Outline.Signature>

  <Outline.Content>
    Raised if the kind is invalid.
  </Outline.Content>
</Outline>

<Outline domain="cpp" objectType="type" target={"_CPPv410CustomList"} module={null} fullname={null} description={"A typedef-like declaration of a type."}>
  <Outline.Signature id="_CPPv410CustomList">
    <Target id="CustomList" /><Target id="_CPPv210CustomList" /><Target id="_CPPv310CustomList" />

    <span>typedef</span><span>{" "}</span><span className="name">std</span><span>::</span><span className="name">vector</span><span>\<</span><span>int</span><span>></span><span>{" "}</span><Outline.Name><span className="name">CustomList</span></Outline.Name>
  </Outline.Signature>

  <Outline.Content>
    A typedef-like declaration of a type.
  </Outline.Content>
</Outline>

Cross reference to [`CustomList`](#_CPPv410CustomList "CustomList").
